<?php

namespace App\Admin\Http\Requests;

class SetAgentInfoRequest extends Request
{
    /**
     * 用户请求认证
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 设置请求验证规则
     *
     * @return array
     */
    public function rules()
    {
        return [
            'agent_name' => 'required|max:10',
            'agent_license_no' => 'required|max:20',
            'agent_mobile' => 'required|max:20',
        ];
    }

    /**
     * 翻译验证属性
     *
     * @return array
     */
    public function attributes()
    {
        return [
            'agent_name' => '经纪人名称',
            'agent_license_no' => '经纪人身份证',
            'agent_mobile' => '经纪人手机号码',
        ];
    }
}
